When downloading https resources with a self-signed certificate, handle python 2.7.9's API breakage

See #1402579 (Can't install calibre due "ssl.SSLError: [SSL] PEM lib (_ssl.c:2525)")