fix undeclared reference to system, and non-existing unload module