Fix runtime error caused by requiring optparse only in the rescue block.