Guard out antique browsers for happier debugging

Comment out more code that existed solely for IE10 and older. This
prevents breaking the "Break on exceptions" functionality of the
Chromium developer tools for no gain.

This also removes the final jshint warnings from this file.
Fix undefined variables

Fixed various typos in references to variables.

Also throw an exception if a variable is not found in GPRINT for
debugging purposes and move some variable declarations.
Fix invalid function call

During conversion from PHP, this function was apparently missed.