root: fix build without XCode

I'm also working on upstreaming added patch (see ROOT-6297)

@iml
I believe this fixes the problem that you've mentioned in #854. Can we now revert 4df95622e5d9457f119a1f85ee1e2c35c2b9995b ?