Javier Hernandez came off the bench to fire a 92nd winner for Mexico in a 2-1 friendly win against Bosnia.