resolveCommonJsModuleName: Fixed accidental global var.
Fixed jshint complaints.