fix StringIO import in python3