Workaround for Java bug on Mac OS X

DatagramSocket#getLocalAddress returns 0.0.0.0 even when
DatagramSocket#connect has been called. There is a similar issue
on Windows XP with IPv6 enabled, see

http://grokbase.com/p/openjdk/net-dev/119qb1e25t/code-review-request-7084030-datagramsocket-getlocaladdress-inconsistent-on-xp-2003-when-ipv6-enabled-and-socket-is-connected

This patch adds a workaround.

Target: trunk
Require-book: no
Require-notes: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: http://rb.dcache.org/r/5448/