added php version check before use of php 5.4 constants