mingw: adjust is_console() to work with stdin