repair Client, add php 5.3 compability to MetricsEndpointTest