Windows| Fix restarting the agent on windows

Fix an issue with the agent on windows.
When a process dies, we recreate it. When we updated the way we handled hostname in the last version, this recreation wasn't updated. So when a process dies, the agent can't start it again.

@conorbranagan @remh @LeoCavaille 
nitpick: can you space this out to `if name != "pup"`? It makes it easier to read and matches our style elsewhere.