Support multi-architecture builds on same machine.

Change-Id: Idf669265f020b19d700767e2e111f5e951b9697e
Reviewed-on: http://review.couchbase.org/41630
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Chris Hillery <ceej@couchbase.com>