boil down difference between branch ipv6 and #29 to a single change

The change between ipv6 branch and my pull request https://github.com/FRiCKLE/ngx_postgres/pull/29 is very subtle. So I branched, too, and put the change here.