fix errors to compile using llvm