[PATCH 4/5] lib: Use G_N_ELEMENTS instead of sizeof()/sizeof()