use charAt as array notation is not available in IE8

`"foo"[0]` is not available in IE < 9. Use `charAt` instead.
Merge pull request #476 from sdepold/patch-2

use charAt as array notation is not available in IE8