gbuild: serialize linking on "make check" too

Change-Id: Icdcca50627d2a7aed19287807f8f1bc17cb18efb
(cherry picked from commit e2bc4c005a13a4e3925c01b1e0d899899494f053)
Reviewed-on: https://gerrit.libreoffice.org/11176
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>