The role of carbonyl and thiocarbonyl groups in the conformational isomerism of haloacetones and halothioacetones