Fixes to MSVC build errors
Compile fix for non-windows
UberThread recasting
Merge pull request #31 from pmprog/master

Fixes to MSVC build errors