Handle deprecation warnings a little more gracefully.

I have a strange compulsion to not want any warning while compiling. Therefore rather than suppressing deprecation warnings, I using explicit minimum OS check at compile time with runtime checks when users want to support 6 and above.