Make version check a little more robust