build: linking with libm is unnecessary on some systems (like OS X)
Inlining of builtin functions can eliminate the libm dependency on other
systems as well, but AC_SEARCH_LIBS can't detect this because it tests
with a false prototype. Thus we use --as-needed linking already to trim
such unnecessary dependencies.
Signed-off-by: Ferenc Wágner <wferi@debian.org>