Fixes for compilation on linux and windows
Merge pull request #2 from zeroniak/master

Fixed a bunch of crossplatform compile problems