Fixes to compile with android cross-compiler

some fixes including pulling in android-ifaddrs, to make it compile on
android. Note, TUNSETGROUP not supported.