I found that browserify tried to do too much by emulating Node within the browser so wrote JoinJS which just implements CommonJS modules without trying to parse the JS files: https://github.com/olegp/joinjs
Your thing could use some tests if you hope for people to trust it :)