Use std::exception in c++11 mode.