flat: fix uninitialized ptr with shared libs