configure: Fix --with-gc-path

* configure.ac: Compute and use GC_LFLAGS properly.
configure: Set gc library name on x86-freebsd

* configure.ac: Set GC_LIB to gc-threaded on x86-freebsd.