Fix compilation errors on clang