Good point.  Well, I have fixed that by using the FindZLIB module that comes with cmake, and setting a ZLIB_ROOT should be enough.  See 7f1c00b and 18cb927.