Use implementations from platform lib

Change-Id: Ic92b3960d73c4f6c89e43491031d386f41754b46
Reviewed-on: http://review.couchbase.org/29578
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>