resolve "must call (at least) setupterm() first" errors for non-ttys