provide browserify compatibility
move browserify compatability into lib/
Merge pull request #994 from enjalot/browserify

provide browserify compatibility