[Dependency] Handle specific version which are in HEAD mode.

Closes #CocoaPods/CocoaPods#864