Fix a possible crash on API < 17 devices.