Replace all usage of `const` with `var`.

@sammyt rightly pointed out that the usage of const is dangerous, given
how badly it is supported across platforms.