I had the same experience traveling from YUL to ORD. The US customs in YUL were very long and it took about 45 minutes to get through. We are required to go through the customs at the YUL airport because when we arrive, we just walk off the plane to our connection or out of the airport. I gave myself 2 hours at the airport to make sure I got through all the lines. Luckily, the baggage security line was almost non-existent because the bottle-neck is at customs.