Computation of the normalising constant for product-form models of distributed systems with synchronisation