We now invoke require on the window rather than the realm, so that the global require() function can actually be replaced.