build: Remove leftover explicit -lm -lz linkage

https://bugzilla.gnome.org/show_bug.cgi?id=723877
build: Force automake C linkage when building C only

Automake chooses the linker to use by examining the _SOURCES.
Unfortunately this includes all potential sources, even the ones excluded by
CONDITIONALS, so it picks CXXLINK because of extractqt.cpp.

Linking the library with CXXLINK brings with it a soname linkage with
libstdc++.
override _LINK for the library target to force automake
to use the specific linker, C(LINK) or C++(CXXLINK)

https://bugzilla.gnome.org/show_bug.cgi?id=723877