Fix getting of character at index

Getting of character at index is not working in Internet Explorer 7 and below.