Fixed #1197: Make Rhino wrapper to be more consistent with NPM package.

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>