Change fmin to min for compiling in Windows