Fixed compilation of python bindings with old Qt versions.