Bug 700937: Limit recursion in regexp matcher.

Also handle negative return code as an error in the JS bindings.
static void die(struct cstate *g, const char *message)
{
	g->error = message;
	longjmp(g->kaboom, 1);
}

static void die(struct cstate *g, const char *message)
{
	g->error = message;
	longjmp(g->kaboom, 1);
}
