Fixed windows port.
Ported iOS
Fixed broken WaitForSingleObject for threads.
Fixed missing / duplicate includes.