term.c: restore termios stuff