VIVO-522 fix memory leak in FreemarkerConfigurationImpl