Because PhantomJS might just re-render the whole page as we changed the viewport size just before.
This could fix some random build failures
We are not sure whether this really helps, so we will merge it and see what happens. If we still have as many random failures, we could revert this Pull request back. Refs #6693
FYI: In case this does not work we could try to force a re-render before capturing a screenshot by increasing the window size by 1px. This could fix random issues as well