Fix link error regarding _libiconv_version on MSVC in C++ mode.

Reported at <https://savannah.gnu.org/bugs/?64227>.

* include/iconv.h.in (_libiconv_version): Enclose in an extern "C"
block.
diff --git a/ChangeLog b/ChangeLog
index fafa3f6..eb24417 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-05-21  Bruno Haible  <bruno@clisp.org>
+
+	Fix link error regarding _libiconv_version on MSVC in C++ mode.
+	Reported at <https://savannah.gnu.org/bugs/?64227>.
+	* include/iconv.h.in (_libiconv_version): Enclose in an extern "C"
+	block.
+
 2023-05-20  Bruno Haible  <bruno@clisp.org>
 
 	Implement GB18030 version 2022.
diff --git a/include/iconv.h.in b/include/iconv.h.in
index f9f1123..6edc50d 100644
--- a/include/iconv.h.in
+++ b/include/iconv.h.in
@@ -20,9 +20,17 @@
 #ifndef _LIBICONV_H
 #define _LIBICONV_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define _LIBICONV_VERSION 0x0111    /* version number: (major<<8) + minor */
 extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */
 
+#ifdef __cplusplus
+}
+#endif
+
 /* We would like to #include any system header file which could define
    iconv_t, 1. in order to eliminate the risk that the user gets compilation
    errors because some other system header file includes /usr/include/iconv.h