Fix for PHP5.3 compat in QueryIterator