Merge pull request #833 from hintjens/master

Problem: zsys_allocs is not defined as external
Merge pull request #834 from hintjens/master

Problem: inconsistent types for zsys_allocs
Problem: zsock_fd and zsocket_fd don't work on Win64

Solution: use/return SOCKET type instead of int.

Fixes #825