update binary reader to adhere to standards, now it should work also on Windows