Fixes platform time_t abstraction

Fixes platform abstraction in error.c and the file that it's generated
from as well as DTLS samples.
diff --git a/include/mbedtls/platform.h b/include/mbedtls/platform.h
index 039cb58..fc3672c 100644
--- a/include/mbedtls/platform.h
+++ b/include/mbedtls/platform.h
@@ -237,6 +237,8 @@
 #if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO)
 typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t;
 #else
+/* For time_t */
+#include <time.h>
 typedef time_t mbedtls_time_t;
 #endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */