fix compilation errors with clang