Viacom Posts Quarterly Profit Despite Weak Film Sales