Avoid warning about not connected peer
Fixed compile with VS 2010

* Avoid the 'min' and 'max' macros.
* Link to zlib also on Windows.
* Shipped zlib for VS 2010 to reduce setup complexity.
* MinGW compiles will rely on GnuWin32's version of zlib.
  It should work but hasn't been tested.