Fix reading max_qg_version

Possible fix of http://hub.qgis.org/issues/8928
Not tested, just from reading the code....