Fix for static-lib use

Ensure WSAStartup() is called only once. Initialise crit-section and remember the error-code. Added pcap_wsockinit().