small patch for api level 10 and below.

- fully compatible with api level 7+.