Fix zlib search algorithm