fixes for VS2013
Merge pull request #1 from vomikan/master

fixes for VS2013