Fixes for C++11 support