can't build IPA using developer certificate in Mac OS X 10.10

I have **only** tested this modification on 10.10, please make sure it works fine on older versions