I think it's a lesser of two evils. I wouldn't normally do it in case of a collision with another library however in this case it a curl constant that's missing. Alot of other people seem to have come up with the same solution https://github.com/search?l=php&q=CURLE_SSL_CACERT_BADFILE&ref=cmdform&type=Code.

I meant to track down why PHP didn't have it / open a bug if there wasn't one when I first wrote this.