Use std:min instead of fminl

Fixes build error on Windows with msvc.
Why was the long double `fminl` function used for integer arguments?