Mac OS: Fix a crash in tst_qgraphicsproxywidget.

Change-Id: Ie93d77f00ee1e6a04ac20794e4d2d1e63cbdb636
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>