Modifies JavaScript code to sandbox all global variable declarations and references.