musl compat - various tweaks to make zfs compile against musl