Fixes for Nashorn/Java 8