fix build errors with clang