fix *BSD breakage from include-order changes (bug #4067)