Workaround for widgetVar undefined

The feature 5850 changed widgetVar's scope, removing them from window to new function PF('widgetVar').

// instead
myWigetVar.samplemethod();

// use
PF('myWidgetVar').samplemethod();

// or
var myWidgetVar = PF('myWidgetVar');
myWigetVar.samplemethod();

It's a feature that ended up coming down from upstream version not intentionally. Therefore, it will be removed in the 3.5.11-UR release.