ENH: more robust backports
Merge pull request #1 from GaelVaroquaux/pr_219

ENH: more robust backports