On the synthesis and the mechanism of formation of halogenated enol lactones