[boehm] Fix memory management for toggleref.