automatically register modules when loading shared libraries.
after refactoring, the deprecated api can now be supported for source code compatibility.