Check for http_proxy definition when adding apt key

Change-Id: Iad14d8a10d901399910c4e980546a751d47327ce
CentOS/RedHat support.

Retains backward compatibility.