Fix undefined property error in PHP5.5.