move linking LIBS to end of command