libslsts: Add initialize and finalize functions