Fix generic build (-f Makefile.legacy) breakage
which was caused by commit 7ec88f81a3826006e667ff8b2972ec89d87612fa.