Fix errors while building with clang