ifmedia: Add two helper functions for ifmedia_add and ifmedia_set