add LIBFLAC_LIBDIR, make AC_TRY_RUN more robust