Fix race condition during build of some file systems.

* make sure the zlib package is available before trying to use zlib.h