c++11 compatibility fixes.