Add O_BINARY to open flags on windows.
fixes #4