Fix compilation warnings and errors by MinGW i686 and x86_64 in Ubuntu 12.04
Support building multiarch deb.