add CommonJS support for npm/Browserify