Use write() to fix SNMP on osx/freebsd.
Land #3935 - Fix SNMP scanners on OS X/FreeBSD