patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe

Problem:    A lot of code is shared between vim.exe and gvim.exe.
Solution:   Optionally put the shared code in vim.dll. (Ken Takata,
            closes #4287)
diff --git a/src/mbyte.c b/src/mbyte.c
index 5019e2f..411c3d9 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -4392,7 +4392,7 @@
 # include <langinfo.h>
 #endif
 
-#ifndef FEAT_GUI_MSWIN
+#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
 /*
  * Get the canonicalized encoding from the specified locale string "locale"
  * or from the environment variables LC_ALL, LC_CTYPE and LANG.