32 bit compilation and iconv detection

This pull request adds the needed flags for 32 bit compilation if configured for a i586 target CPU, and fixes iconv detection for the cases where iconv is part of GNU libc instead of a separate library.