[eclass] Sync with portage.

This improves support for ninja, wrt bug #490280.