Set raw mode only for terminal streams