ringojs/rhino compatibility layer, completes 51cd4f5