Fix a few warnings/errors for compiling with -fno-exceptions.