build: Check for libm in configure (again)

As we did in 0e0e387356b340d2f539ad20696237fc94259b08 which
got broken by 4d78c0ecc8c0a6a92cd29da0d0a55fc546e5463d.

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