Fix JSHint errors, and make JSHint run on Travis.