Various changes to support Clang.