fixes to build under clang++