fix compile errors with clang.