reorder and add missing libraries to fix building with binutils-gold