Optionally support AMD - fall back to globals