port freebsd ioctls to osx