A couple of people were broken by the previous zlib patch. It turned out
this was because I used find_libraries for searching for the z library.
This returns absolute paths, and when these paths made it into
llvm-config, it made it produce nonsensical flags for the --system-libs
output. To fix this, I hand-roll a search for the library in the same
way that we search for the terminfo library a couple of lines below.
This is a bit less flexible than the find_library option, as it does not
allow the user to specify the path to the library at configure time
(which is important on windows, as zlib is unlikely to be found in any
of the standard places cmake searches), but I was able to guide the
build to find it with appropriate values of LIB and INCLUDE environment
variables.
It might be nicer if this was out-of-lined.