try again on vs2012 build fixes
Merge pull request #541 from sgraham/fix-vs2012

try again on vs2012 build fixes