Fix jshint issues with globals