Update module wrapper to work in Node and be more in line with UMD

I couldn't get this module to load properly in Node, so I modified the wrapper to be more in line with [UMD](https://github.com/umdjs/umd).