Make the check for GTK+ >= 2.10 pass for GTK+ 3 too by simply not making it in this case. Closes #18004.