Use kqueue on Apple platforms.