Fix build errors with recent gcc

Use std::isfinite() to fix these build errors:

mariadb-server/sql/item_func.h:235:26: error: ‘isfinite’ was not declared in this scope
mariadb-server/sql/field.cc:2705:19: error: ‘isfinite’ was not declared in this scope

diff --git a/sql/field.cc b/sql/field.cc
index 585abad..87cff61 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2702,7 +2702,7 @@ int Field_decimal::store(double nr)
     return 1;
   }
   
-  if (!isfinite(nr)) // Handle infinity as special case
+  if (!std::isfinite(nr)) // Handle infinity as special case
   {
     overflow(nr < 0.0);
     return 1;
diff --git a/sql/item_func.h b/sql/item_func.h
index 6230550..0938946 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -232,7 +232,7 @@ class Item_func :public Item_func_or_sum
   */
   inline double check_float_overflow(double value)
   {
-    return isfinite(value) ? value : raise_float_overflow();
+    return std::isfinite(value) ? value : raise_float_overflow();
   }
   /**
     Throw an error if the input BIGINT value represented by the
