fix static_cast<enum>(non int type) in msvs

msvs2010 does not support this cast type anymore
workaround for now is just to use an intermediate
int cast. Once we switched to C++11 compatible
compilers on the build machine there might be a
nicer solution with <type_traits>