Fix display of git branch on Python 3