Fix compilation errors with HAVE_ZLIB option