python 3.3 StringIO backwards-compatability workaround