Fix building with -std=gnu++11 -stdlib=libstdc++ under OS X.

Take into account the possibility of using C++11 compiler with non-C++11
standard library as this may happen when targeting OS X < 10.7, in which case
C++11 libc++ can't be used.

Closes #16730.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775