Add patch to fix 3.17 build breakage

Unfortunately now it breaks in a different way, but it's a little closer to working!