[Command::Spec] Fix crash

Closes https://github.com/CocoaPods/CocoaPods/issues/1543