Fix static linkage

Task-number: QTBUG-34638
Change-Id: Ie8fc39459107a984fac02396537c99bea1f29691
Reviewed-by: Ivan Vizir <define-true-false@yandex.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>