Browserify works now correctly (Fixes #16)

Idea taken from here:
https://stackoverflow.com/questions/16172035/browserify-use-module-exports-if-required-otherwise-expose-global