Intramolecular 5-endo-trig aminomercuration of beta-hydroxy-gamma-alkenylamines: efficient route to a pyrrolidine ring and its application for the synthesis of (+)-castanospermine and analogues.