use _read() instead of read() on windows