Modify patchRAP() to patch MouseEvent prototype directly