I like how Wikipedia mitigates that problem by placing "Suggested languages" at the top (I think the top choices are inferred from either the Accept-Language HTTP header or the most common languages from the user's country) and below that there's a list of "Worldwide" languages which include the most used languages in the world, and finally the rest of the languages are grouped by continent.
There's also a search bar for filtering and it works with either the native or foreign name of the language. So, for example, typing "Finnish", "Suomi" or "Fines" (the latter is even misspelled, should be "Finés") will all filter out the right language.
Of course, there may be an edge case that's missing, but it's as close as perfect as it can get without reading the user's mind.