Further changes to achieve compat with Nashorn java 8