Fix compile errors with clang