With a sufficiently low C standard version, struct timespec isn't
defined in time.h causing warnings. By adding guards for the version
in which timespec_get() was introduced we ensure that struct timespec
is defined.
These guards are based on the discussion in the origonal review:
https://reviews.freebsd.org/D16649