Speed hack: replace POSIX::isatty with test -t

And drop compile time from 3.1s to 2.6s.