Reset terminal settings after segfault on OS X

Without this, segfaults leave the terminal in an abnormal state (output is not echoed, among other things).