More accurate isatty test for MinGW.