Updated to work with browserify v3