Strip square brackets when creating IPv6 sockets