Fixes the base directory of libgc objects.

Previous commit accidentally removes '.libs/' from libgc_OBJECTS.
This happened because my current environment doesn't support .so.

This CL doesn't revert the change, but to remove '.libs/' only when
the current target doesn't support .so.