Work around IO objects with broken implementations of #read, such as Zip::InputStream.