Fixed an issue with the safe string compare function on Python 2.7.7 and Python 3.4.