How to add engine version dependent code to Build.cs file?

Hi!
I want to know, is there any way to use different code in Build.cs of my plugin for different engine versions. Maybe something like

#if UNITY_5

in Unity.
I just don’t want to use deprecated api in 4.16.1 and want to be able to use the same plugin in earlier versions.