Fix errors/warnings with Clang 6