Synthesis of 1,4-dien-3-ones and 2-cyclopentenones