Added workaround for versions of Qt 5 below 5.3.1