Add support for wrapping the build in UMD syntax.
Merge pull request #3039 from tschaub/umd

Support for UMD builds.