Fix sleep calling under Linux. Under windows untested.