Try harder to support gtests with non-standard build config am: 5515310c7e
am: e40ef50af5

Change-Id: I8229f70c425aac1e401678a1f12aaf963716f7fe