BUG: support old scikit-learn versions