add cross platform isatty