Fix UMD globals for browser-like environments in types.

Replacing this.returnExports with this.<name-of-type> in ext/types to make them work correctly in browser-like environments.