Pip 6.0+ compatibility fixes

Use stdlib logger in newer versions of pip
See https://github.com/pypa/pip/pull/2008 for details
I think it would be safer to try the import and catch the ImportError rather than catching TypeError for such a broad piece of code. We could even build a kwargs dict then, avoiding the repeated list comp. Thank you for the fix!