resourceloader: Use mw.log instead of 'throw' for scripts with syntax errors