Fixes usage of pods in static libraries with Xcode 6.

Fixes #2666.
Merge pull request #2676 from CocoaPods/issue/2666

Fixes an issue when using pods in static library targets