Data.Coerce is base >= 4.7
handle linux' weird tty error codes