Fixes for building on FreeBSD

This provides some minor fixes for building the library on FreeBSD.
Specifically this includes some special handling for DTrace, and fixing
up some missing includes.

Tested with FreeBSD 10.1

Change-Id: I0a7f6d3c25ffed6ef081978418bbabe3558aaf01
Reviewed-on: http://review.couchbase.org/44402
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>