Fix build errors for Clang