Fixes #460

Ensure that variables are declared with var
Merge pull request #461 from aodn/issue-460

Fixes #460