minor fixes to build with clang