[wayland_common] Fix checking of the QT_WAYLAND_RESIZE_AFTER_SWAP env var

Partial backport of upstream 9550e25, change id
Iad94691317bde38603d9143f951b1b69326ab12e
Merge pull request #59 from giucam/resize-fix

[wayland_common] Fix checking of the QT_WAYLAND_RESIZE_AFTER_SWAP env var