patch 9.1.1163: $MYVIMDIR is set too late

Problem:  $MYVIMDIR is set too late and not available while sourcing
          runtime files (Maxim Kim, after v9.1.1159)
Solution: Also set it when $MYVIMRC file is found

fixes: #16764
closes: #16767

Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/option.c b/src/option.c
index fa34546..f61d726 100644
--- a/src/option.c
+++ b/src/option.c
@@ -8420,6 +8420,8 @@
 		vim_setenv(envname, p);
 		vim_free(p);
 	    }
+	    // Set $MYVIMDIR
+	    export_myvimdir();
 	}
 	else if (dofree)
 	    vim_free(p);