added support for ipv6 in Ubuntu < 12