This fixes a segfault in some C++ programs which use exceptions before main() has been called (i.e. from global constructors). Reviewed by: deischen