configure: in check_ld, place new -l flags before existing ones