s3: add Darwin sendfile support and merge with the FreeBSD code