Fix compilation on win64.
Fix runtime behavior with std::min, std::max on win64
Merge pull request #8 from ySalaun/develop

Fix problems encountered on win64