fix c++ runtime bug, support static object ctor/dtor