Wear Safari Hat and start pet battle, once pet battle is loaded replace Safari Hat with your Heirloom helm and upon victory you'll get bonuses from both helms.
Here are testing results from pve pet battles (lvl 1 vs lvl 1). Last two rows demonstrate effect of replacing one headgear with another during mini game:
pet exp char's exp No helm 50 5829 Heirloom Helm 50 6246 Safari Hat 55 5829 Heirloom Helm->Safari Hat 50 5829 Safari Hat->Heirloom Helm 55 6246