Fix C11 and POSIX 1003.1b-1993 compliance in time.h
Only expose timespec_get in C11, C++17, or BSD code. Always define
struct timespect if defining timespec_get.
PR: 231425
Reviewed by: kib
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D17174