Detect IPv6 address and report as such

Fixes http://bugs.jruby.org/7013