Halohydrin formation in dimethyl sulfoxide