Gloriously nasty implementation of caretPositionFromPoint for IE