Fixed dismissal code for iPad when activity controller is NOT presented via popover