Xcode 6.1 compatibility

I have checked that it is possible to build in Xcode 6.1 and 6.0.1.
Like specifically—in case you want your patch in PMK—we should return a rejected promise here. Otherwise we will crash for invalid URLs.