Add UMD boilerplate

Would you be interested in adding a Universal Module Definition (https://github.com/umdjs/umd) so that the code can be used as a module in a CommonJS or AMD environment? Here's a pull request doing so.