Check zlib availability usin AC_CHECK_LIB

This is workaround for zlib 1.2.3 which does not come with pkg-config
file.