added support for php 5.2.x (and less than 5.3.6)