Removed global references when using AMD.