The effect of ionic liquids on the rate of an intramolecular nucleophilic substitution: the study of a monocyclic rearrangement of heterocycles