News Corp profit beats expectations; newspaper ad sales still weak