Fixing QuerySet import for Django < 1.7.