Fix building with -fno-exceptions