Very rough hack to make everything compile and run under vs2013.
Merge pull request #1 from epidemicz/master

Very rough hack to make everything compile and run under vs2013.