Loosely based on upstream commits

Index: libraries/source/spidermonkey/patch.sh
--- libraries/source/spidermonkey/patch.sh.orig
+++ libraries/source/spidermonkey/patch.sh
@@ -34,6 +34,9 @@ patch -p1 < ../FixMSVCRootedVoid.diff
 # so this patches it to an arbitrarily high Mac OS 11
 patch -p1 < ../FixMacBuild.diff
 
+patch -p1 < ../FixVirtualenvForPython310.diff
+patch -p1 < ../FixPythonCollectionABC.diff
+
 # Fix FP access breaking compilation on RPI3+
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1526653
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1536491
