fixed C++ linking issues with -fno-exceptions and -fno-rtti