Compatibility fix

Adjusted to work with versions of PHP below 5.3
Merge pull request #13 from bcole808/development

Compatibility fix