Fix JENKINS-16990

Added class loader to the script variables and
passed it to the SimpleTemplateEngine