Truck parts maker Meritor has beaten analysts' expectations of second quarter profit after margins increased and sales at its aftermarket and trailer segment rose.