Make this usable with browserify

- Add dependencies to package.json
- Wrap the lib with AMD / CommonJS checks
- Document use in nodejs