work around misdetection of stdin attached to a tty