test: fallback to IPv4 if IPv6 is unavailable
openssl seems to default to use IPv6. This change adds a check if IPv6 is unavailable and uses IPv4 instead. On the Node.js CI IBM i build system IPv6 is currently disabled. This change should resolve the following test case failures:
CC
@nodejs/platform-ibmi @richardlau