fixes to clang++ 3.4+