Fix cursor positioning on Safari 6.1 and later

Adapted from http://github.com/ajaxorg/ace/pull/1566
Merge pull request #70 from rstudio/bugfix/safari-fractional-cursor

Fix cursor positioning on Safari 6.1 and later