use O_NDELAY instead of O_NONBLOCK for mingw