Fixed compiler errors on clang