Only detect zlib when it hasn't already been detected.