From http://mail.openjdk.java.net/pipermail/nashorn-dev/2013-October/002228.html