Add IPv6 support to IP lookup.

Fixes #1.