Fixed compile errors when compiling with clang.