Restore compatibility with older py.test.