Add IPv6 support

Closes #3.