Fix compilation error with "void setnetgrent" / "void endnetgrent"

Code assume that the functions "setnetgrent" and "endnetgrent" return
int. On some platform (some bsd, android, ...) the return type is void.
This patch fix the compilation issue by testing return type with autoconf
add a test for bionic before including netinet/ip.h