I *really* dislike this aspect of the design.  Now khan-lite.js isn't a library, but instead has unstated global dependencies that are embedded in a particular template...

My favored solution is to pass parameters.  If you want to use this globals-based method, then please pull the functions using the globals out into a separate file that is clearly linked to base_distributed.html--call it base_distributed.js.