Fix casting issues with GtkHeaderBar

https://bugzilla.gnome.org/show_bug.cgi?id=722227