Fixes segfaults for sys_event_flag_(create/get)

Neither sys_event_flag_create() nor sys_event_flag_get() checked for
NULL pointers in their arguments, which caused the corresponding test
from ps3autotests to segfault.