get query results in dependence of rdflib version