Make it work in node.js as well as browser

Also make sure tests get run in both environments.
Sure, up to you - personally I don't see the benefit, and I wouldn't really want to support such a package...