Nodify

A few small changes to:

1. allow the lib to be used as a node module
2. allow running tests with `jasmine-node` on the command line