Fix s3put to be compatible with Python 2.5.x