[configure] Check that the -lgc is valid.

Also, only add ${with_gc_path} to CFLAGS / LFLAGS when it is set.
[configure] Don't always search default directories.

When searching for a static libgc, only look in the default directories
when --with-gc-path has not been given.