callPhantom should be available before the parsing

Some scripts should be able to call callPhantom
directly during the page parsing. So we cannot
declare it after the page loading.