patch 8.2.4354: dynamic loading of libsodium not handled properly

Problem:    Dynamic loading of libsodium not handled properly.
Solution:   Fix has() and :version. Show an error message when loading fails.
            Fix memory leaks. (Ken Takata, closes #9754)
diff --git a/src/version.c b/src/version.c
index 8919e59..2476818 100644
--- a/src/version.c
+++ b/src/version.c
@@ -548,7 +548,11 @@
 	"-smartindent",
 #endif
 #ifdef FEAT_SODIUM
+# ifdef DYNAMIC_SODIUM
+	"+sodium/dyn",
+# else
 	"+sodium",
+# endif
 #else
 	"-sodium",
 #endif
@@ -747,6 +751,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4354,
+/**/
     4353,
 /**/
     4352,