Fix building with MinGW
Make default User-agent follow RFC 2616
Fix win32 reading semaphore count not working (broke all queues)