Various fixes for clang 3.4.