Djbdns support

Rebase djbdns support for current git master. Fixes #1.