Define TESTS_ENVIRONMENT in more portable way

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