syscall: use libc-based ioctl for Ioctl in tests on darwin
Direct syscalls are no longer supported on darwin, instead wrap the
existing func ioctl for tests.
Change-Id: Ie2c5b6e5f54e992f4d6b21513ca8f89fcf28ef10
Reviewed-on: https://go-review.googlesource.com/c/go/+/256219
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>