Add semicolons to js code to avoid potential bugs.

See http://stackoverflow.com/a/1169596/652702