Had the same problem on the current project. After the second try to install the trim, I set the trim in place, and scribed around the inside, with a exacto blade. I removed the trim, and shaved the gasket (to the outside of the scribe) with wood carving tools ( Used to carve Ducks)
Sounds a bit hokey, but it worked, and you cant tell by looking at it. Best of luck, it's a gooey mess at best.