fixes to make the library compile for php 5.6 environments (problem discovered in issue #59)