nsswitch: Handle possible NULL return value of getprogname()