added check for idn2
use idn2 instead of libidn2 to avoid the need for GPL3+ license