gbuild: serialize linking on "make check" too

Change-Id: Icdcca50627d2a7aed19287807f8f1bc17cb18efb
(cherry picked from commit e2bc4c005a13a4e3925c01b1e0d899899494f053)
Reviewed-on: https://gerrit.libreoffice.org/11175
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>