export to CommonJS environment

Allow to use this module in CommonJS environments (think browserify)