propagating some bootstraping changes from jsreport core