[safestack] compilation fixes