Solving optimal growth models with vintage capital: The dynamic programming approach