Implement blocking/non-blocking pipe I/O on Windows