Adds UMD support

This pull request adds [UMD](https://github.com/umdjs/umd) support to the module, specifically the [returnExports](https://github.com/umdjs/umd/blob/master/returnExports.js) variant.