Fixed linking with pthread library.
Additional MDN fields (thanks to Mehmet Bozkurt).
Link with "ws2_32" library on Windows, if available.