quick-and-dirty port of jclouds-372 fix