Fix compilation of synchronized predicates when using backend Prolog compilers that don't support a compatible threads implementation