Compile and run sensibly under Linux

 * add signal.h

 * use sockopt IPV6_V6ONLY=0 to allow IPv4 connections as well as IPv6

 * check for existence of sin6_len field before use

Signed-off-by: Andrew Childs <lorne@cons.org.nz>