gcc: support `import std` (cherry picked from commit a980dab9b1 (gcc: support `import std`, 2024-11-21))