Does MPP actually set PCGender to 0 or does it simply allow it to remain there? Because if it sets the value at zero, we could simply add the global variable with a default value of 99 or something like that. Then, if the user has MPP or UMP installed, the save game will already have that variable stored as a 1 or 0 and will overwrite our 99 value. Then, if the PCGender is 0, we know it's SET there, because if it's unset, it'll still be 99.
It would still be a good idea for MPP to use a non-zero value for valid PCGender settings, but this would allow us to work around the problem - being compatible both with the existing MPP settings as well as any future modified ones. Like Melian, I think 1 and -1 would be a better choice than 1 and 2, although to be honest, I can't really explain why (except that opposite genders having opposite values has a certain appropriate artistic value). It just seems intuitively a better choice. Filtering on !=1 would render true on -1, 0, 2, or 99, with most of those values being invalid. Filtering on <0 will always render correctly without any false positives (no pun intended).
re: non-present globals
That's not possible. The construction set won't allow a script to compile if it references a global variable that isn't defined. The only way that NoM 3.0 could check the PCGender variable is if it ALSO defines it. However, since the save game will overwrite anything added by a mod, if PCGender is already defined by a previously existing mod, it's old value (in the save game) will overwrite the default value in a newly added mod.