configure: Check for localtime_r properly