Samsung Q3 profit beats expectations