GH-116226: include `pthread_stubs.h` in `pycore_pythreads.h` (#116227)

diff --git a/Include/internal/pycore_pythread.h b/Include/internal/pycore_pythread.h
index d017d4f..d2e7cc2 100644
--- a/Include/internal/pycore_pythread.h
+++ b/Include/internal/pycore_pythread.h
@@ -46,7 +46,8 @@ extern "C" {
 
 
 #if defined(HAVE_PTHREAD_STUBS)
-#include <stdbool.h>              // bool
+#include "cpython/pthread_stubs.h"  // PTHREAD_KEYS_MAX
+#include <stdbool.h>                // bool
 
 // pthread_key
 struct py_stub_tls_entry {