Allow builds with -DNDEBUG

Change-Id: Idfd9c7a7a057301c88f9aaec15d46dd86fbe5844
Reviewed-on: http://review.couchbase.org/27463
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>