Tweak the fallback locale logic to resemble the one in symfony/intl.