Fixes for C++11 build