Lancashire's England seamer James Anderson took three wickets but Glamorgan had the better of their Division Two clash at Colwyn Bay.