making it python 3.2 compatible. tell me if the check_hostname is really needed, looks like it defaults to False anyway