Fixes for Clang building