fixed a bug with recent versions of zlib