[Compiler] Adapt ModuleLoader to changed syntax
The last commit changed the syntax how modules register their types.
(It's now done using a registerModule method instead of just returning
the data).
This commit adapts ModuleLoader to recognize that call.