Synthetic uses of thionyl chloride