Added AMD and CommonJS support
Merge pull request #15 from heruan/amd-support

Added AMD and CommonJS support