Backport #391 to 1.7.x branch

This PR backports #391 to the 1.7.x branch.

JIRA: https://issues.apache.org/jira/browse/JCLOUDS-455