Fix agent auth on Windows/Python 2.5) (with thanks to @lndbrg)