link libjulia with -lz, but not necessarily the julia executable
ref #4742
bring back --system-libs for LLVM >= 3.4
a change I needed to make USE_LLVM_SHLIB work
use llvm-config --ldflags both before and after --libs
Merge pull request #7696 from JuliaLang/jb/fixlibzlink

make sure libjulia is linked against libz