mremap wrapper for mingw