gnome-boxes: fix kernel checks

Perform kernel checks only when kernel sources are available, and add
a missing call to determine the kernel version. Fixes Gentoo
bug #504822.