Fix linker-order-dependent compiler failure in makefile