Casts required to build with msvc
Define in_addr_t on windows.
Merge pull request #641 from jossgray/master

Fix some build issues with msvc