updated to work with Browserify v2