Equivalence of Bolza and Mayer Optimal Control Problems