Fix some Windows system dependant code.