Fix unit tests failing if IPv6 not available

See:
https://github.com/minetest/minetest/issues/1526
https://github.com/minetest/minetest/issues/793