improved browserify support courtesy of @ryanramage