Fix binary mode stdio on Windows
Merge pull request #91 from invl/master

Fix binary mode stdio on Windows