SECOND AMENDMENT TO THE AMENDED AND RESTATED INVESTOR RIGHTS AGREEMENT