add defined test on some constant to avoid PHP Notice error when using classes