x11: add explicit cast in mods conversion

Explicit is better and all.

Signed-off-by: Ran Benita <ran234@gmail.com>
x11: add #actions == #syms check

This must always hold (but if there are no actions, #actions==0), and
explicitly ensures there won't be a division-by-zero a bit below.

Signed-off-by: Ran Benita <ran234@gmail.com>