Fix for C++11 and gcc 4.8