add cast to get rid of compiler warnings (VS2010)

Signed-off-by: Martin Ankerl <martin.ankerl@gmail.com>