Patch to fix bug where imagecache does not work for images stored on s3