Use the correct string type for Python 2 & 3