Added CommonJS support
Merge pull request #4 from heyday/commonjs-compatibility

Added CommonJS support