Fix static link order