Fix for cross compile

Replace AC_TRY_RUN with more modern AC_RUN_IFELSE and assume
printf of NULL does not seg fault