Nodejs Adapter

Work to ensure the package can be redistributed as an npm module and included as node modules, as well as working in an AMD loader on the web as intended, and as a single-file distributable that sets a global variable.