Fix python version checking. Refs #3135