[1773] Fix ExecJS exception

Fixes #1773

Don't ask me why this works. Perhaps someone else could shed some light on it?