Add support for minherit() libc function

The function minherit() is currently defined on freebsd, macos and ios,
but inherit values have different names on macos and ios.