Add UMD wrapper that works with browser/amd

Adapted code from https://github.com/umdjs/umd/blob/master/amdWeb.js to wrap in UMD that registers as an anonymous AMD module. Note that no global will be exposed if AMD is used.