Make -Wunused-but-set-variable conditional on GCC version, so that it doesn't generate extra warnings on Clang and old GCC.