fixes for LLVM/Mac