It is true that all religions have philosophies in it. No intellectual can challenge it. And if he does so, he is not entitled to be called an intellectual. Yes, one may agree or disagree with those. That is an entirely different issue and acceptable too.
As far as the issue of preceding is concerned, I slightly differ from James. In some cases, philosophy predates religion, but in some cases, religion predates philosophy.
All those religions, which starts from any prophet or any incarnation of a diety, religion comes before philosophy.
Take Islam, there was nothing in Islam before Muhamad. He came first, then the philosophy of Islam came. The same true for religions like Shivaism, which starts from a particular deity.
But, there are a different type of religions, in which philosophy comes first and manifests religions, like Vedanta and Buddhism.
Contrary to general perception, Vedanta is not based on Vedas. It looks at Vedas as a sceptic, and takes its own course of investigation. It moves forth and back many times, tries different modes of investigation, and then reaches to conclusion after many amendments. Thus, it is a philosophy.
The same is true for Buddhism and Sufism too. Like Vedanta, Sufism also does not take Quran verbatim, as conventional Islam did and stll does. Sufism explorred different explanations and kept itself amending. That is why it is a philosophy.
But, if James think that Abrahamic Prophets were not Prophets in reality, and they just put forth what they considered appropriate at their times, he is right in his own way in claiming that philosophy always predates religion.
With love,
Sanjay