Add test for nqp::link and fix it on the JVM