The pkgconfig detection is not available for old versions of zlib, so  let's use simpler approach for now