Added support for AMD loaders

A simple fix enables AMD loaders such as [RequireJS](http://requirejs.org/) to use this package. I haven't tested the CommonJS version since I don't use it, but I don't see why it wouldn't work as expected.