Python 2.5 compatibility

Where I work, we use pysolr but we're stuck with python 2.5 for various reasons.  Here are the minimal changes required to make it compatible with python 2.5.