Make version checking Yosemite compatible

Without this change the version reported in $macOS is 101 on Yosemite. This changes it to be 1010 and is backwards compatible back to 10.1. This too will break in the future (after version 10.99...) but that problem can be solved another day.