Backport JCLOUDS-630 to 1.8.x

Master: 007a3b7
JIRA: https://issues.apache.org/jira/browse/JCLOUDS-630
See comment in #118