US inflation cools to 3.4% as core eases to 2.5%