main/vim: add workaround for bug in vim's LDFLAGS modification

Starting with abuild-3.8.0_rc1 vim no longer builds with the default
LDFLAGS value provided in /etc/abuild.conf. This is due to LDFLAGS
modifications performed by vim's build system.

See https://github.com/vim/vim/issues/8181

With this commit --as-needed is no longer the last linker option. Not
sure if this is relevant or not.
7 jobs for !21180 with vim-buildfix-sed-ldflags in 28 minutes and 54 seconds (queued for 1 second)
latest detached
Status Job ID Name Coverage
  Lint
passed #387750
docker-alpine x86_64
lint

00:00:20

 
  Build
passed #387755
docker-alpine ci-build aarch64
build-aarch64

00:03:00

passed #387756
docker-alpine ci-build armv7
build-armv7

00:03:27

passed #387754
docker-alpine ci-build ppc64le
build-ppc64le

00:03:25

passed #387753
docker-alpine ci-build s390x
build-s390x

00:28:31

passed #387752
docker-alpine ci-build x86
build-x86

00:02:00

passed #387751
docker-alpine ci-build x86_64
build-x86_64

00:01:09