fix mapscript builds for #4621