fix rotation with system version check

Added system version check to fix rotation issue on ios 8.