RFC2822 date string parser in C