rgw: fix compilation for certain architectures

Casting.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>