Fix JS errors reported by jshint 2.1.4

Change-Id: Ice92f6102e285d3f92d13d839589aa6a1924e666
Merge "Fix JS errors reported by jshint 2.1.4"