Fix aliasing issues when compiler with non g++ makespecs

As it turns out, need -fno-strict-aliasing. It should not only be applied when
the mkspec happens to have g++ in its name, we also need it for qnx (qcc) and
any other compiler that pretends to be gcc (sets QMAKE_COMPILER to gcc).

Change-Id: Id4d152e4fcaa06ecd8acb47a3d8a41997ba82b75
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: Ia7239e9362ee936303aaa084cba0fd67c5576c48