Try to find zlib and pthreads before setting CFLAGS.

This is to see if Lwan will build under Travis-CI for Techempower's Web
Framework Benchmark.  For some reason it is not finding pthreads, but
since I can't really debug, this is just a hunch.