Removed some php 5.3+ only usages to make the library compatible with php 5.2