I would replace this with a custom "legendIconUrlTemplate" that would be made availabl by the print controller.