Changed the use of std::stoi to std::istreamstring in unfold_generic to ...

...allow compiling with CodeBlocks.