How to set VRSettings.supportedDevices in build script

I am attempting to update build scripts to be able to create builds which support different VR SDKs however I cannot find any way with which I can set the supported devices from script.

I realise it’s possible to change it in the editor, in Player Settings, however this isn’t an option as the scripts are intended to be used on a headless build machine. We also do not want to link to multiple SDKs when the builds are intended to be targeting one.

Is there a way that I can set this from a build script?
Currently using Unity 5.4.0f2

string newDevices;
newDevices = new string { “OpenVR” };
UnityEditorInternal.VR.VREditor.SetVREnabledDevices(BuildTargetGroup.Standalone, newDevices);