Use updated macro names for C++11 detection.
Fixes #8747.