Move LD flags around to fix a build error.