Fix exception handling for non CXX_EXCEPTIONs.