This PR looks good, but I'm not super happy with this patch. Can we fix this upstream? Or, alternatively, can we `sed` this rather than patching? I'm generally opposed to any patch applied to external dependencies as they are a maintenance nightmare and hurt our ability to upgrade dependencies by creating toil.