Make AMD and CommonJS compatible
Merge pull request #4 from fedemp/master

Make AMD and CommonJS compatible