More robust kernel check.
Merge pull request #97 from byronmccollum/kernel-check

More robust kernel check.