Use UMD to support Node.js, AMD, and browser globals

This change uses the [Universal Module Definition](https://github.com/umdjs/umd) so that the script can be loaded by [AMD loaders](https://github.com/amdjs/amdjs-api/wiki), Node.js, or just plain browser script tags using globals.

This uses the boilerplate from the  [UMD repository](https://github.com/umdjs/umd).