utils.c: add helper function to format mac addresses as strings