Fix segmentation fault under threaded Django dev server