Added check for libz.