Fix C++11 detection for gcc <= 4.6