Backport PR 499 to 1.8.x

Backport of #499 to the 1.8.x branch

JIRA: https://issues.apache.org/jira/browse/JCLOUDS-686