Do not compile third-party libraries available on ubuntu

Change-Id: I726256feba018c98386257b070ac905154e513fe
(cherry picked from commit e201e369175f3c85d886b5983b5363505b4ed560)
Merge "Do not compile third-party libraries available on ubuntu" into R1.10