fix if_nametoindex return value when interface does not exist
the return value is unsigned, so negative results for "errors" do not
make sense; 0 is the value reserved for when the interface name does
not exist.
(cherry picked from commit 8041af59881219c32267c3491bee43591d3c3fe6)