api: non glibc c++ systems do not define __THROW

Let __THROW be defined conditionally for more portability

Change-Id: I6e7cb1eb59b84988e155e9a8b696e842b7ff8f7f
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7757
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-by: Anand Avati <avati@redhat.com>