Adjust flags to support older Sun Studios

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