Intramolecular [2+2] photocycloaddition of oxoesters and oxoamides