fix POSIX/ISO issues with _isatty in Win