stmhal: Enable moductypes by default.

Also fixes compiler error in moductypes when compiled without debugging.

Addresses issue #778.