Update version checking code to use Apple-recommended approach