configure: Properly check for availability of -Wno-foo warning flags