fixes for php 5.0.x 
refs #65