Fixed compatibility with older scrapy releases