An investigation of the intramolecular ene reaction of N-acyl imines