fix compile error on Minix.
refine header handling in configure.