Fixes to compile with clang