Fixes for building with clang