Fix build with gcc 4.8

Change-Id: I00c03521d2eadaf5e2ba301d3cef376a9ee2c586
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
copybit: Fix type conversion error for GCC 4.7

GCC 4.7 has stricter type conversion rules

Change-Id: I699cfe1ceafb5728fb8e6f34f7b1996d3c812e7e