added requirements to composer.json, made code compatible with php 5.3.0