Autoconf: Fix for non-native builds. When using 'action-if-defined' for
AC_CHECK_LIB we don't get the default action so we need to do it manually.