use charAt() instead of brackets to access string character
IE7 does not support bracket access to string characters and errors:
http://stackoverflow.com/questions/5943726/string-charatx-or-stringx
Merge pull request #2221 from craigteegarden/ie7-bracket-to-charAt

use charAt() instead of brackets to access string character