Fix 9: Support either AMD or CommonJS by using UMD returnExports

Use UMD returnExports https://github.com/umdjs/umd/blob/master/returnExports.js in order to support both AMD or CommonJS.

 - [ ] Does tests pass?
 - [ ] Is coding standards correct?