fix bash syntax error in Darwin kernel-detection code, and add version for Mavericks

Sorry for the bad pull request... this one is better.