Fix 64bit compilation: max can be a macro