After r274246 make the tree compile again.

gcc requires variables to be initialised in two places.  One of them
is correctly  used only under the same conditional though.

For module builds properly check if the kernel supports INET or INET6,
as otherwise various mips kernels without IPv6 support would fail to build.