added check for SDK-Version for getting window size in different versions