Piotr Caban : msvcrt: Fix console detection in _write.