External JS libraries not getting automatically loaded in JIRA 8.5

I have upgraded JIRA server from 7.4.4 to 8.5.0 and after that I am facing issues with YUI and ludo-jquery libraries not getting loaded.
These libraries are being used for custom reports pages and till now have been been working well in jira 7.4.4

After upgrade to 8.5.0, javascript is not automatically played when the report page is loaded and i am getting “$(…) is not a function” and “undefined” error.

Is there a way to auto-load external javascript libraries in JIRA v8.5.0?

This is my VM file

<link  href="/jira/ui/ludo-jquery/stylesheets/screen.css" media="screen" />
<script type="application/javascript;charset=utf-8" src="/jira/ui/ludo-jquery/vendor/jquery.js"></script>
<link href="/jira/ui/ludo-jquery/stylesheets/jquery.treetable.css" type="text/css" />
<link href="/jira/ui/ludo-jquery/stylesheets/jquery.treetable.theme.default.css" type="text/css" />
<script type="application/javascript;charset=utf-8" src="/jira/ui/ludo-jquery/javascripts/src/jquery.treetable.js"></script>

<!-- Combo-handled YUI CSS files: --> 
<style>    
.icon-story { display:block; height: 22px; padding-left: 10px; background: transparent url(/jira/images/icons/ico_story.png) 0 0px no-repeat; }
.icon-epic { display:block; height: 22px; padding-left: 10px; background: transparent url(/jira/images/icons/ico_epic.png) 0 0px no-repeat; }
.icon-req { display:block; height: 22px; padding-left: 10px; background: transparent url(/jira/images/site/requirement.gif) 0 0px no-repeat; }
.icon-defect { display:block; height: 22px; padding-left: 10px; background: transparent url(/jira/images/site/defect.gif) 0 0px no-repeat; }
.icon-backport { display:block; height: 22px; padding-left: 10px; background: transparent url(/jira/images/site/branch.gif) 0 0px no-repeat; }
#defect-link-div table{
	font-size:12px;
}
#defect-link-div thead{    	
	font-size:12px;
	background-color:#D8D8D8;
}
#defect-link-div td,tr{   	    	
	border-top-width:0pt;
	border-right:thin solid;
	border-left-width:0pt;
	border-bottom:thin solid;
	border-color:black;
	vertical-align:middle;
}
#defect-link-div tr:hover{
	background-color:#BEE0FE;
}</style></head><body><div>Filter Query : $filterQuery <br>Issue Link Type "$linkType" <br>Number of Issues Retireved : $issueCount<br>List of Field Selected$fieldList</div><div id="defect-link-div"><table id="defect-link-table">  <thead><tr>$unescaper.html($tableHeader)</tr></thead><tbody>  $unescaper.html($treeList)</tbody></table></div><script type="text/javascript">
	$("#defect-link-table").treetable({ expandable: true });
</script></body></html>

Error I am getting is $(…).treeTable is not a function