Juan Martin del Potro survived an injury scare to overcome Spain's Albert Montanes on the first day of the French Open at Roland Garros.