Compatible with 2.7.
Merge pull request #5 from nanliu/27

Fix conditional to be compatible with 2.7.