fixed compile errors using llvm