changing from compile time OS version checks to run time OS version check