Fix encoding error when running older python versions.