Define module with UMD pattern

Using the universal module definition pattern simplifies the
requirements to consume this module in those projects that use AMD
without effecting compatibility in those that do not.

This should resolve gh-7