Put C on top of AC_LANG stack after MPI check

(cherry picked from commit 8bb0540cdae6f56252c0e48563135514955cbd3b)