changes for having sleep working with gcc2.7