Added support for Windows.

This change is backported from the gopacket project. I tested the compilation on win32, darwin and linux.