Import from zlib 1.2.8