add support for registering modules inside a script loader