Check for existence of isatty on stdout before calling it