fix nanosleep test
fix nanosleep compat emulation