patch 8.2.1115: iminsert test fails when compiled with VIMDLL

Problem:    Iminsert test fails when compiled with VIMDLL.
Solution:   Change condition. (Ken Takata, closes #6376)
diff --git a/src/testdir/test_iminsert.vim b/src/testdir/test_iminsert.vim
index 1f19412..80088c3 100644
--- a/src/testdir/test_iminsert.vim
+++ b/src/testdir/test_iminsert.vim
@@ -27,7 +27,7 @@
   set imactivatefunc=
   set imstatusfunc=
 
-  let expected = has('gui_win32') ? 0 : 1
+  let expected = (has('win32') && has('gui_running')) ? 0 : 1
   call assert_equal(expected, s:imactivatefunc_called)
   call assert_equal(expected, s:imstatusfunc_called)
 endfunc
@@ -38,7 +38,7 @@
   elseif !has('gui_mac')
     CheckFeature xim
   endif
-  if has('gui_win32')
+  if has('win32') && has('gui_running')
     set imactivatefunc=
     set imstatusfunc=
   else