Fixed compile errors with clang