Make the unit test pass on older scikit-learn versions