iOS packaging fails with "PhysX" and "APEX" modules

Error: fatal error C1021: invalid preprocessor command ‘undefine’