Add a knob to prefer IPv4 over IPv6, it fixes #2833