Detect piped output automatically given the posix extension