xmrig is not preferring ipv6 over ipv4
**Describe the bug**
It seems xmrig is not preferring ipv6 over ipv4. Running it on a ipv6-only host with a pool that has an A and an AAAA record (ipv4 + ipv6) xmrig is not able to connect because it tries to connect using the ipv4 address. Passing the ipv6 address instead of the domain to xmrig makes it work.

**To Reproduce**
Run xmrig with a pool that has an ipv4 and ipv6 address. Xmrig will try to use the ipv4 instead of the ipv6 address.

**Expected behavior**
If an ipv6 address (AAAA record) exists it should always be preferred.

**Required data**
XMRig 6.16.2
 built on Dec 20 2021 with GCC 10.3.1
 features: 64-bit AES

libuv/1.42.0
OpenSSL/1.1.1l
hwloc/2.5.0
