overloaded require() for browsers using XMLHttpRequest