Fix deprecation warnings

Change-Id: If0a4a7157c6f9036c2957357c42d0f937f98b8a9
Reviewed-on: http://review.couchbase.org/40024
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>