patch 8.2.4257: Vim9: finding global function without g: prefix inconsistent

Problem:    Vim9: finding global function without g: prefix but not finding
            global variable is inconsistent.
Solution:   Require using g: for a global function.  Change the vim9.vim
            script into a Vim9 script with exports.  Fix that import in legacy
            script does not work.
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 45883b1..5a088b4 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -2801,7 +2801,7 @@
   assert_equal(2, winnr())
   var buf = term_start(&shell, {hidden: 1})
   popup_create(buf, {})
-  TermWait(buf, 100)
+  g:TermWait(buf, 100)
   popup_clear(true)
   assert_equal(2, winnr())