mac/clang build fixes