Use std:min instead of fminl

Fixes build error on Windows with msvc.
Fix build error with gcc
Merge pull request #139 from cgohlke/patch-1

Use std:min instead of fminl