compilation fixes for clang++ compiler