Cyclization of 2-acyl- and 2-thioacylaminobenzylcyclopropanes in the gas phase and solution