Best way to add kotlin-stdlib-jdk7 to a main-kts script with correct version

I have a .main.kts script, and I want to use classes like kotlin.io.path.Path from the library kotlin-stdlib-jdk7.

I can use this annotation: @file:DependsOn("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20") to bring in the dependency, but then I have to hard-code the version of Kotlin in my script. I really want to use the version of Kotlin which matches the runtime, whatever that might be. Is there some way of doing that?