Use -std=cxx11 if the compiler supports it

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