Fixed segfault on GCC. It was picking the wrong overload:
by forward-declaring the std::function overload in `stack`, it is able to find the right function to use.
All tests are passing
the ninja file has been tweaked to make it easier to invoke a g++ build on windows
Merge pull request #30 from ThePhD/master

Fixed segfault on GCC, updated ninja file for easier windows builds (and easier debug builds)