build: check for fopencookie() in configure