Fix 9: Support both 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.

 - [x] Does tests pass?
 - [ ] Is coding standards correct?