changed es5 compat path to work with "use strict"

For HADINF-362.  xb1 apps must "use strict".  I simply rearranged the <ES5 compatibility code path to be use-strict-friendly.