FIX: Only set agent if it is set

This change allows to make thing clearer about the fact if the agent specified is used
or not, even if the default behavior of the http.request is to used the
http.globalAgent while the agent given in options is "undefined".

(from the official doc undefined (default): use global Agent for this host and port.)
FIX: Missing closing bracket.
FIX: Remove trailing spaces.