Try to fix 'O_BINARY' was not declared

closes #461