Check if zlib is available before building libxml2. (#1188)