compatibility with some old jQuery versions

Some jQuery versions require changes to `updateTooltipPosition`, because, in those versions, calling `$(window)innerWidth()` throws an exception. Same happens with `innerHeight`.

Statistics show that those versions are still in use on a number of production sites.