It did the trick because older versions don't validate the call to the setQueryTimeout(int), as you can see here:

===
Version 8.3-603 (2008-01-31):
...
Throw an exception if people try to use...