Fix tests for OS X machines with IPv6 enabled.