fdo#52076 remove empty library instead of writing it out empty

Change-Id: Id4fd8c4f34e8ed07044eb428049731c4b9b694ca
Reviewed-on: https://gerrit.libreoffice.org/10507
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>