Fixed some segfaults on macosx due to newly introduced wxApp virtual methods which may be called with an uninitialized phpobj.