Move the code to C89

Change-Id: I6035040768f5a388cc903fe3e90142372c6a6ab1
Reviewed-on: http://review.couchbase.org/26924
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>