Avoid the use of inet_pton to parse ipv6 addresses.

This (hopefully) avoids test failure when running under a python
compiled without ipv6 support.