I don't love the preprocessor black-magic to replace every mmap() call, but it avoids having to modify any other functions. If we want to avoid that, map_pe_header() and map_file_into_view() are the mmap() calls that I know need to be changed.
That would be preferable. Note that most (all?) callers already do a mprotect() after the mmap() so there's no need to do it twice.