Hello! Thanks for looking into the issue and for submitting a fix suggestion in the form of a patch!
It would be easier to process the patch if it was an actual git commit with explanation of why you think this is the correct solution, how it has been tested to verify that it does indeed fix kFreeBSD builds in Debian and how it has been fixed to prove that it does not cause regressions on other platforms etc. Sending a patch suggestion is already great and you are not obligated to polish it. I am only letting you know that it is much easier for somebody else to finish/merge this if it is more polished, but it will eventually be done with the current version of the path as well, just maybe a bit slower. - Otto