Added version checking for class definition

client.py cannot run after 2to3 because httplib.HTTP is not available, but it is not needed on Python3 anyway.
We should define the related class only when needed.