Fix stat.st_gid on FreeBSD 10 (applying push request jnr-ffi/18).

I'm re-submitting the changes proposed by @beauby in the [pull request 18][pr18] of the jnr-ffi repository. That pull request was never integrated and I'm suspecting the build error reported by TravisCI was not related with the push request itself.

However, the proposed change is very little and I checked that it fixes the problem (by rebuilding jnr-ffi and using it with the latest Logstash distribution).

[pr18]: https://github.com/jnr/jnr-ffi/pull/18