Modify string formatting to be compatible with Python 2.5