diff --git a/configure.ac b/configure.ac
index 732ac2d..c41f2f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -886,10 +886,10 @@ if test "x${enable_nss}" = "xyes" || test "x${enable_nss}" = "xstatic"; then
 					[Please specify the path to libnspr4.a]
 					[Example: --with-nspr-libs=/usr/lib])
 				else
-					nsprlibs="$DL_LIB $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB"
+					nsprlibs="$DL_LIB $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a"
 				fi
 			else
-				nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
+				nsprlibs="$DL_LIB -lplc4 -lplds4 -lnspr4"
 			fi
 
 			AC_CACHE_CHECK([for Mozilla nspr libraries], [ac_cv_moz_nspr_libs],
diff --git a/modules/plugin-python/Makefile.am b/modules/plugin-python/Makefile.am
index 4aaf14a..6bc2dcf 100644
--- a/modules/plugin-python/Makefile.am
+++ b/modules/plugin-python/Makefile.am
@@ -13,7 +13,7 @@ libevolution_module_plugin_python_la_SOURCES =			\
 	e-plugin-python.h
 
 libevolution_module_plugin_python_la_LIBADD =			\
-	-lpthread -ldl -lutil -lm				\
+	-ldl -lutil -lm						\
 	$(top_builddir)/e-util/libeutil.la			\
 	$(E_UTIL_LIBS)						\
 	$(PY_LIBS)
diff --git a/shell/main.c b/shell/main.c
index 72e9aed..a221f54 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -266,18 +266,16 @@ idle_cb (gchar **uris)
 
 static void (*gnome_segv_handler) (gint);
 static GStaticMutex segv_mutex = G_STATIC_MUTEX_INIT;
-static pthread_t main_thread;
+static GThread *main_thread = NULL;
 
 static void
 segv_redirect (gint sig)
 {
-	if (pthread_self () == main_thread)
-		gnome_segv_handler (sig);
-	else {
-		pthread_kill (main_thread, sig);
+	gnome_segv_handler (sig);
 
+	if (g_thread_self () != main_thread) {
 		/* We can't return from the signal handler or the thread may
-		   SEGV again. But we can't pthread_exit, because then the
+		   SEGV again. But we can't g_thread_exit, because then the
 		   thread may get cleaned up before bug-buddy can get a stack
 		   trace. So we block by trying to lock a mutex we know is
 		   already locked.  */
@@ -294,7 +292,7 @@ setup_segv_redirect (void)
 	if (osa.sa_handler == SIG_DFL)
 		return;
 
-	main_thread = pthread_self ();
+	main_thread = g_thread_self ();
 
 	sa.sa_flags = 0;
 	sigemptyset (&sa.sa_mask);
