configure: Check for INFINITY

If it is missing, check for __builtin_inf() and define it to that.
Otherwise, fail loudly.