Replace deprecated function usages

Change-Id: I9261cbaa988e32b01bae0844783adf0f4474ad62
Reviewed-on: http://review.couchbase.org/36230
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>