clang compatibility fixes