fix without IPv6

I work with [Buildroot](http://buildroot.net/) which is a tool for building embedded linux system.
Buildroot supports various C libraries which have or not the IPv6 support.

With uClibc without IPv6, I obtain the following error :

```
  CC       ext/posix/ext_posix_posix_c_la-posix.lo
ext/posix/posix.c: In function 'Psetsockopt':
ext/posix/posix.c:3642:10: error: 'IPV6_JOIN_GROUP' undeclared (first use in this function)
ext/posix/posix.c:3642:10: note: each undeclared identifier is reported only once for each function it appears in
ext/posix/posix.c:3643:10: error: 'IPV6_LEAVE_GROUP' undeclared (first use in this function)
ext/posix/posix.c: In function 'luaopen_posix_c':
ext/posix/posix.c:4701:2: error: 'IPV6_JOIN_GROUP' undeclared (first use in this function)
ext/posix/posix.c:4702:2: error: 'IPV6_LEAVE_GROUP' undeclared (first use in this function)
ext/posix/posix.c:4703:2: error: 'IPV6_MULTICAST_HOPS' undeclared (first use in this function)
ext/posix/posix.c:4704:2: error: 'IPV6_MULTICAST_IF' undeclared (first use in this function)
ext/posix/posix.c:4705:2: error: 'IPV6_MULTICAST_LOOP' undeclared (first use in this function)
ext/posix/posix.c:4706:2: error: 'IPV6_UNICAST_HOPS' undeclared (first use in this function)
ext/posix/posix.c:4707:2: error: 'IPV6_V6ONLY' undeclared (first use in this function)
```