Optimal harvesting policy for an age-specific population