Unbreak and simplify code for clang build.