Fix build with zlib >= 1.2.6 (patch from Fedora)