Fix httpdomain compatibility issue with Python 2.6