Added zlib to configure
Fixed mem leak in search_buf
better error checking for realloc