Fixes for c++11 build with gcc/clang.