This doesn't totally make sense to me, but I'll give it a shot. Have you tried running this in a normal browser and seeing if it works there? If it does, it might be a bug in zombie.js, which you should file in its github issues.
Browsing through the issues briefly, I saw a few already open that are related to the window object, it might be worth looking through these. For example, https://github.com/assaf/zombie/pull/360.
That being said, although I don't have a direct answer to this question, I have two suggestions that might get you through the problem.
Use a document ready handler in your on-page script and a callable function in your external script. So in foo.js, it would look like this:
window.foo_value = function(){ return 'foo' };
and in your on-page script, like this
<script>
window.onload(function(){ console.log(window.foo_value) });
</script>
... no guarantees that this would work, but if it didn't it would definitely be a bug in zombie.js, and you could file that as an issue and hopefully get it fixed.
- Use PhantomJS, which does the same thing and is more popular : )