tests: some old OSes don't support %N on the date command

Check for %N in configure and drop it from the format where it is not supported.
Fixed #671519