Use AMD when available
Merge pull request #13 from fsbdev/master

Use AMD if available - fall back to Global