dnsmasq: move feature detection inside a shell func