Use cfmakeraw to set terminal to raw mode

cfmakeraw function does the same (see man 3 termios).