scripts: fix toolchain detection for stack trace