Assorted CMake fixups

I've been annoyed at the playing around which we do with zlib for a while, and in an issue recently there were agreeing voices. The configuration stage is there to know what we have or don't have, so let's show that.

The second commit comes from #2118 

The last one from a comment in #2311 which claims that it works, so let's see if it causes problems in Travis. If not, there's not much reason to exclude it.