Various fixes for building against LLVM trunk.