I think the nginx resolver directive is what you want as it can take an option to disable ipv6 record look ups.