Add wrapper to create and destroy library instances.