The 4th amendment is largely suspended at international border crossings. It's a travesty. This has been steadily built in supreme court rulings since 1925, but a 1977 ruling says the searches are inherently reasonable because they occur at the border. No probable cause or warrant is required.
If you really want to be depressed, Google "4th amendment free zones" which essentially means this doctrine applies within 100 air miles of an international border crossing.