zlib: fix write request reference counting