Use API functions based on availability

Hi,
I'm using es6-module-loader in a custom javascript environment and made these changes to avoid errors.
I have a window object, but do not have a document.getElementsByTagName, I have an XMLHttpRequest but no require.

This check is in SystemJS in the register extension (https://github.com/systemjs/systemjs/blob/master/lib/extension-register.js#L458).

If you need that functionality, add just the register extension to the module loader from there.