Compatibility fixes for Python 3.
PyOpenImageIO compilation fixes for Python 3.

Python3 string are unicode objects by default, require different handling from byte arrays.