Convert bytes object to str for Python 3