This sounds like a cool experiment.
I don't know OpenWRT. Can you send me the output of the './configure' and the 'make' commands? Also send me the content of 'config.h' after running ./configure. The strcasestr function should be in 'string.h'. On older compilers, it's possible that it's in 'strings.h'. Anyway, this strcasestr function can be a problem, so I've written my own which is placed in alternative.c which comes with Hiawatha. So, the only thing we have to find out is: does your compiler know strcasestr and if so, in which library it is. Can you 'grep' for it in /usr/include? (grep -r strcasestr /usr/include)