Browserify support

Fixes #4777