inet_pton() implementation for Windows XP

Here is the requested inet_pton() implementation for Windows XP ([mailinglist](http://www.freelists.org/post/nanomsg/Minimum-supported-windows-version,3)).

Creative criticism is very welcome because I don't have previous experience with the functions in question :-)

I'm a little bit unsure about the return codes. Are they correct and are there any conditions that I should have checked?