Calculate needXScroll with scrollbarSize

Otherwise scrollbars appear when they are not supposed to (chromium 25 at least)