Reactions of 5-substituted (S)-1-acyl-3-(E)-(dimethylamino)-methylidenepyrrolidine-2-ones and (S)-3-(E)-(dimethylamino)methylidenetetrahydrofuran-2-ones with amines