Digging in to the dark magic of postgresql, i discovered that the integer to boolean cast can be changed from an exlicit to an automatic coersion. Then changed back when done...
update pg_cast set castcontext='a' where casttarget = 'boolean'::regtype;
Then load with pg_dump.
When done, set back the casting to its default with...