server-mode: Fix named pipe mode
C-style APIs are so horrible to work with! No idea why this ever worked, but it did. In fact it works reliably on my laptop, but fails 95% of the time on my desktop:-/
It would be great if this could make it into 3.7, but that is probably too late now:-/