Fix code style issues picked up by the latest version of jslint