Fix a string comparison for Python 3 compatibility.
Use bytes() for Python 2.6 compatibility.