Build: configure: Fix "make check" running under coverage/profiling.
When either --with-coverage or --with-profiling is passed to
./configure, "make check" will fail because at least one of the test
programs uses the fabs function and that symbol will not be found. This
is because those two build options add -fno-builtin, which tells gcc to
not pull in any of its builtin function implementations.
fabs happens to be a gcc builtin. So, add -lm to the linked command
line only when one of those options is present.