Optimal control problems with differential algebraic constraints