Fix some issues with llvm source build (#57792)
- The build fails if any runtime is enabled as `LLVM_ENABLE_RUNTIMES`
will start with `;` which it seems to interpret as a runtime whose name
is the empty string.
- When llvm links against libLLVM, this fails as some of the compilers
on CI set a sysroot causing zlib to not be found, see
https://github.com/llvm/llvm-project/issues/131119.
- Also, fix freebsd build by compiling statically linked code with `-fPIC`.