Improve automatic compiler checks.

This is primarily to benefit MacOS users (Apple ship a really old version
of gcc alongside a new version of clang meaning only clang has C++11
support).

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>