MB-9504: Check for __GNUC__ instead of HAVE_VISIBILITY

Change-Id: I74848480d33ce14b50232b765e592c37ef370b53
Reviewed-on: http://review.couchbase.org/30227
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>