Explicitly check for clock_nanosleep and only use it when available