BUG: fix old versions of scikit-learn