make sleep cross-platform

via preprocessors