Configure: Moved check for Math lib to a dedicated M4 macro