fix compile fail on vs2012.
Merge pull request #3915 from Dhilan007/0002

[ci skip]fix compile fail on vs2012.