Removed global reference when using AMD.