autoconf: fix iconv library paths

The Nokogiri test suite was failing to link against iconv on windows, and I think this patch addresses the issue by fixing iconv library paths and passing cflags when building executables.

See 0f77167f for prior related work.

This patch applies cleanly to v2.11.2 and should probably be considered for a backport.

Merge request reports