Update QueryBuilder.php

This alternative solution LIMIT, OFFSET problem SQL Server version older than 2012.
I think it looks more elegant than pull request #3241