Added getCursorPosition().
Fixed #21.