Fix linking, somehow

This may not build on first try with parallel make,
but works okay with -j1.