Remove dependence on c++11