add cast to get rid of compiler warnings (VS2010)

Hi, I've just added two casts to prevent VS2010 to pop up any warning when compiling. We generally use the warnings-as-error settings in our projects so this is important to us.

Signed-off-by: Martin Ankerl <martin.ankerl@gmail.com>