Make compatible with AMD for use in the browser.

See: https://github.com/amdjs/amdjs-api/wiki/AMD
Merge pull request #3 from BallBearing/AMD

Make compatible with AMD for use in the browser.