This call may be being loaded too late on the page. Add this code to the very top of the page and see if that fixes it.
If that isn't it please post some additional information. (Where the call is being made? Some more information on the page? Is this being called from an external .js file?)