use a gcc version check in 4.9 warning workaround

Only disable the spurious warning on versions of GCC that
need it, so we don't hide real warnings or break older
compilers unnecessarily.

Followup from https://codereview.chromium.org/384843002/

BUG=392872

Review URL: https://codereview.chromium.org/413023002

git-svn-id: https://src.chromium.org/chrome/trunk/src/url@286347 4ff67af0-8c30-449e-8e8b-ad334ec8d88c