Android: improve build stability