Fix osx compilation again, hopefully better this time.
added extra buffer and limit to mprotect not to exceed the length of that buffer