Merge "libexternal: fix mode selection"