Port the detection of zlib from the main autoconf system to the sample