always declare O_BINARY

closes #461
Merge pull request #497 from Mailaender/patch-2

Fix error: 'O_BINARY' was not declared in this scope (close #461)