use binary mode for stdin/stdout on windows