Better detection of lchown / lchmod

The problem was that Linux behavior regarding lchown / lchmod is really
annoying. lchmod is defined and can be found with the default header
settings, but at runtime it always fails with errno ENOSYS.

This results in failures such as this:

https://travis-ci.org/rom-rb/rom-relation/jobs/9530098

This tries to create a better detection with the options that should
match the runtime behavior reasonably well. This also fixes the issue in
the travis build with regard to lchmod.