Move some platform dependent or heavy includes in the cpp file when possible.

It also fixed the compilation process using C::B/MingW