Use `character` instead of `char` as a variable name

`char` used to be a reserved word in ES3 (http://mothereff.in/js-variables#char). This simple change avoids errors in older JavaScript engines such as Narwhal.