Fixed deprecation warnings for DefaultHttpClient.