fix duplicate libraries on gcc command line

Task-number: QBS-710
Change-Id: I935f8d4033d5be37bbf13c79b0225a57539d196b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>