Fix the linking order in Makefile