Set the terminate handler to std::abort.

Per issue #12541.