Tweak module loader to use a custom require.