clang 4.2 compile fixes (wip)