configure: add return() statements in 3 AC_LANG_PROGRAM() blocks