add CommonJS support

Great lib! This will make it much nicer for folks who use the CommonJS module format and browserify or stitch to package for the browser.