No, it's not possible. V4 is backwards compatible with V3, so any script written targeting V3 will work fine with V4.
If you want to write scripts that support both V3 and V4, it's best to use a machine/VM with V3 installed to make sure you don't rely on V4 features.