Fix compile fail on vs2010
Merge pull request #3809 from Dhilan007/master

[ci skip]Fix compile fail on vs2010