Add definition of list_first_entry_or_null in case not defined

Change-Id: I1a27924b7eee7be046c071020c2fc9551c315039
Signed-off-by: Or Kehati <ork@mellanox.com>