For anyone wondering, I found a solution for me by using the keyword GLOBAL (note allcaps) instead of var. This will make the variable global for the whole script (ChaiScript instance), however it was pretty much what I wanted. I'd guess having an actual file-global variable is impossible because of how the whole scripting system works.
Either way, I really think the documentation for the chaiscript API (as well as chaiscript) can be improved. Currently everything is very spread out and its difficult to find basic stuff like the GLOBAL keyword. I will look into writing a documentation myself.
EDIT: For example, the GLOBAL keyword should really be listed here: http://chaiscript.com/docs/5/LangKeywordRef.html