patch 8.2.2680: Vim9: problem defining a script variable from legacy function

Problem:    Vim9: problem defining a script variable from legacy function.
Solution:   Check if the script is Vim9, not the current syntax.
            (closes #8032)
diff --git a/src/proto/vim9script.pro b/src/proto/vim9script.pro
index a7d821c..c43120c 100644
--- a/src/proto/vim9script.pro
+++ b/src/proto/vim9script.pro
@@ -1,5 +1,6 @@
 /* vim9script.c */
 int in_vim9script(void);
+int current_script_is_vim9(void);
 void ex_vim9script(exarg_T *eap);
 int not_in_vim9(exarg_T *eap);
 int vim9_bad_comment(char_u *p);