compat: make clock_nanosleep usable by other OSes
This is to allow clock_nanosleep to be used by emscripten without having to add a header or conditionally define the NSEC_PER_SEC.
Note: We need <mach/clock_types.h> for clock_id_t too.
Edited by Mehdi Sabwat