minor fixes for mac/clang builds