configure: pass extra flags to check_cc from check_ld