Allow _prepare_conn() to run on Python 2.6.4

Taking advice from https://github.com/shazow/urllib3/pull/411#issuecomment-46397017 and subsequent comments to clean up the code a little and pacify coverage tests.