Fixed build errors from GCC 4.6.

Apparently, GCC 4.6 and nested exceptions are not compatible.