modified build to work with older versions of php