Issue resolved by changing transform(shim) to transform({global:true},shim)