compiling fixes for visual c++ 11/12
Merge pull request #148.