Statically bind global variable references where possible (bug 561923, r=brendan).