Photocyclization of acrylanilides