Added AC_CHECK_LIB fallback for brew