Add support for CommonJS and AMD.
Merge pull request #1 from adamdicarlo/support-amd

Add support for CommonJS and AMD.