Longshoremen reach tentative agreement with ports, shippers, averting a potential strike