patch 8.1.2361: MS-Windows: test failures related to VIMDLL

Problem:    MS-Windows: test failures related to VIMDLL.
Solution:   Adjust code and tests. (Ken Takata, closes #5283)
diff --git a/src/menu.c b/src/menu.c
index e55cab6..2632794 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -685,7 +685,11 @@
 	    if (	addtearoff
 		    && *next_name
 		    && vim_strchr(p_go, GO_TEAROFF) != NULL
-		    && menu_is_menubar(name))
+		    && menu_is_menubar(name)
+#  ifdef VIMDLL
+		    && (gui.in_use || gui.starting)
+#  endif
+		    )
 	    {
 		char_u		*tearpath;