Fix IPv6 support

Fixes issue #62