add a fix for tun/tap related crashes (backported by Carlos Sobrinho)