re-committing some updates from CiviCRM 4.3.4 and most recent Media updates