Fix compatibility with Python 2.6.1 (Snow Leopard)

This workarounds a bug in Python 2.6.1 that has been fixed in later versions. Since this version is the default one in Snow Leopard system, it makes sense to add a simple, non-invasive workaround.