Index: session.c
--- session.c.orig	2007-04-10 20:21:21 +0200
+++ session.c	2007-06-05 19:54:14 +0200
@@ -2420,7 +2420,9 @@
 		ses->defered_target = stracpy(target);
 		ses->defered_target_base = df;
 		ses->defered_data = data;
+#ifdef JS
 		ses->defered_seq = jsint_execute_seq++;
+#endif
 		return;
 	}
 	pos = extract_position(u);
Index: view.c
--- view.c.orig	2006-11-08 17:13:24 +0100
+++ view.c	2007-06-05 19:53:30 +0200
@@ -3210,6 +3210,7 @@
 
 #ifdef JS
 	if (!event_catchable(ev) || !fd->f_data || !fd->vs) goto dont_catch;
+#ifdef JS
 	if (fd->vs->current_link >= 0 && fd->vs->current_link < fd->f_data->nlinks) {
 		struct link *l = &fd->f_data->links[fd->vs->current_link];
 		if (ev->b < EVH_LINK_KEYDOWN_PROCESSED && l->js_event && l->js_event->keydown_code) {
@@ -3229,6 +3230,7 @@
 		ev->b = EVH_DOCUMENT_KEYPRESS_PROCESSED;
 		if (!(call_keyboard_event(fd, fd->f_data->js_event->keypress_code, ev))) return 1;
 	}
+#endif
 	dont_catch:
 #endif
 
