fix some compile bugs in mac llvm compiler.