Add commonJS support

Added commonJS module.exports support for Node/Browserify.