Add -no-undefined to GENERIC_LDFLAGS, and use it.