fix build when NEWJB is not defined (issue #5046)