Fix included in #41
This change should by working on younger php installations