Clang compilation fixes