fixed compile error on windows (missing fmax).