linux: ensure the netlink socket is correctly opened with older Linux kernels

It is possible for the extra socket flags (available from 2.6.27 on) to be
defined but not available. Check for this case and set the flags correctly
on the netlink socket.