Script now defines an AMD module if possible
Merge pull request #365 from michaelday/master

Script now defines an AMD module if possible