patch 8.2.4457: the GPM library can only be linked statically

Problem:    The GPM library can only be linked statically.
Solution:   Make it possible to load the GPM library dynamically. (Damien)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index cea002f..eb42269 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -5786,7 +5786,7 @@
 #endif
 		},
 	{"mouse_gpm",
-#if (defined(UNIX) || defined(VMS)) && defined(FEAT_MOUSE_GPM)
+#if (defined(UNIX) || defined(VMS)) && defined(FEAT_MOUSE_GPM) && !defined(DYNAMIC_GPM)
 		1
 #else
 		0
@@ -6392,6 +6392,10 @@
 	else if (STRICMP(name, "terminal") == 0)
 	    n = terminal_enabled();
 #endif
+#ifdef DYNAMIC_GPM
+	else if (STRICMP(name, "mouse_gpm") == 0)
+	    n = gpm_available();
+#endif
     }
 
     // features not in has_list[]