EZP-23208: fixed the wrong version check in the async. publishing ezjscore func

This is adapted for 4.x from 1f54b6251a85c3c85e41ece43f35421de9fc0bdb