Update use of charCode for IE support #503