Check current SDK version instead of target SDK verion.

Fixes crash on 2.3 devices.