Add "var" so element is local instead of global

Strict mode doesn't allow undeclared global vars, and these really should be local anyway.