ADI export script (bug 1014752)

Fixes [bug 1014752](https://bugzilla.mozilla.org/show_bug.cgi?id=1014752)
Because assigning to a variable that wasn't declared won't work. Just using it or returning it would use the global namespace, but not if you're assigning to it. This is why the ```global``` statement here is mandatory.

And if you feel uncomfortable because this is a global, I'm too, but the other solutions we came up with were far worse.