Fix for LLVM35 API changes, closes #5984