Fixed up makefiles: for some reason now LLVM debug build doesn't produce
-ldl and -lpthread in the link command and these have to be supplied manually.