charAt for lower browsers