Add 4 to version sniffing code

Fixes #336