EU posts nearly $5B trade deficit in January-July