Use some JS best practices

* Provide a `radix` parameter to `parseInt`.
* Fix a global leak.
* Fix a var declaration.
* Remove unneeded semicolons.
This file use tabs for indentation, please conform this line (and others if it is needed) to the rest of the code.