Check for existence of localtime_r() during configure

Signed-off-by: Huang Le <4tarhl@gmail.com>