Adjust kernel version parsing to be more lenient of strange things like "3.12-1-amd64"

Fixes #4310