Fix autodetection for extended language identifiers