Fix compatibility issues with python 2.5 in S3 plugin

As per subject, this is what I needed to change to make it work with my 2.5 installation.