Fix the shell hostname style to work on python 2.6 and below