Use `charAt` for IE7 support

Just in case anyone ever needs IE7 support.