fix php 5.3

Fix #546 

Not tested, just quick edit