IPv6 support for GetHostname

Signed-off-by: Gregory Detal <gregory.detal@uclouvain.be>