Fixed compiling on Linux and one compiling warn.

This is the initial fix to make it at least compile on Linux but the win32 includes has to be somehow changed I believe :)