function test(){
	test_func();
}
try{
	test();
}catch(e){
 if(new String(e).indexOf('is not a function')!=-1){
	//тут парсим строку е и находим имя функции что б подгрузить нужный файл
	var headID = document.getElementsByTagName("head")[0];         
	var addScript = document.createElement('script');
	addScript.type = 'text/javascript';
	addScript.src = '../your_func.js';
	headID.appendChild(addScript);
	test();
 }
}
решение для песочницы, не более