Add an uncaught exception handler for the Apple & new GNU runtime.