Check if Page Manager exists before calling function

Fix template.php breaking site if Page Manager is not enabled.