Change to_unicode behavior with python2