index: use `var` instead of `const`

For compatibility with older ES3 engines when used
in the browser (i.e. with browserify).
Merge pull request #2 from TooTallNate/update/use-var-statements

index: use `var` instead of `const`